package com.mhz.widgets.shared;

import com.google.gwt.user.client.rpc.IsSerializable;
import com.google.gwt.view.client.ProvidesKey;

public class MultiComboItem implements IsSerializable {

	private String code;
	private String value;
	private String formatedValue;
	private boolean visible = true;

	public static final ProvidesKey<MultiComboItem> KEY_PROVIDER = new ProvidesKey<MultiComboItem>() {
		@Override
		public Object getKey(MultiComboItem item) {
			return item == null ? null : item.getCode();
		}
	};

	public MultiComboItem(String code, String value) {
		this.code = code;
		this.value = value;
		this.formatedValue = value;
	}

	public MultiComboItem() {
		super();
	}

	public String getCode() {
		return code;
	}

	public String getValue() {
		return value;
	}

	public String getFormatedValue() {
		return formatedValue;
	}

	public void setFormatedValue(String formattedValue) {
		this.formatedValue = formattedValue;
	}

	public boolean isVisible() {
		return visible;
	}

	public void setVisible(boolean visible) {
		this.visible = visible;
	}

}
